package com.share.oauth2.resource.rest;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.cglib.core.Local;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * @author:caifan
 * @since 2023/7/26
 */
@RestController
public class UserRest {

/*    @RequestMapping("/user")
    public Map<String, Object> getUser(HttpServletRequest request, HttpServletResponse response) {
        Map<String, Object> map = new HashMap<>();
        map.put("name", "heihe");
        map.put("time", LocalDateTime.now());
        return map;

    }*/

    @GetMapping("/time")
    public String current() {
        return LocalDateTime.now().toString();
    }
}
